import React from 'react'
import { BrowserRouter, HashRouter, Routes, Route, Link, NavLink, Navigate } from "react-router-dom"
import Login from './pages/Login'
import Register from './pages/Register'
import Home from './pages/Home'
import NotFind from './pages/NotFind'
import Main from './pages/subs/Main'
import User from './pages/subs/User'
import Role from './pages/subs/Role'
import ProductList from './pages/subs/ProductList'
import Category from './pages/subs/Category'
import { Button, ConfigProvider, Space } from 'antd';
import ProductAdd from './pages/subs/ProductAdd'
import ProductUpdate from "./pages/subs/ProductUpdate"
import DynamicRouter from './router/DynamicRouter'

function App() {
  return (
    <div>
      <ConfigProvider
        theme={{
          token: {
            // Seed Token，影响范围大
            colorPrimary: '#a0d911'
          },
        }}
      >
        <BrowserRouter>
          <DynamicRouter></DynamicRouter>
          {/* <Routes>
            <Route index={true} element={<Login></Login>}></Route>
            <Route path="/register" element={<Register></Register>}></Route>
            <Route path="/home" element={<Home></Home>}>
              <Route index={true} element={<Main></Main>}></Route>
              <Route path="user" element={<User></User>}></Route>
              <Route path="role" element={<Role></Role>}></Route>
              <Route path="list" element={<ProductList></ProductList>}></Route>
              <Route path="category" element={<Category></Category>}></Route>
              <Route path="productAdd" element={<ProductAdd></ProductAdd>}></Route>
              <Route path="productUpdate" element={<ProductUpdate></ProductUpdate>}></Route>
            </Route>
            <Route path="/404" element={<NotFind></NotFind>}></Route>
            <Route path="*" element={<Navigate to="/404"></Navigate>}></Route>
          </Routes> */}
        </BrowserRouter>
      </ConfigProvider>

    </div>
  )
}

export default App